﻿#region 程序集 VanillaPsycastsExpanded, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null
// C:\code\MyMod\MOD\bin\this!!!!!!!1\1.4\Assemblies\VanillaPsycastsExpanded.dll
// Decompiled with ICSharpCode.Decompiler 7.1.0.6543
#endregion

using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using RimWorld;
using RimWorld.BaseGen;
using RimWorld.QuestGen;
using RimWorld.SketchGen;
using UnityEngine;
using Verse;
using Verse.Noise;
using RimWorld.BaseGen;
using ResolveParams = RimWorld.BaseGen.ResolveParams;
using RimWorld.Planet;
using Verse.AI.Group;
using Verse.AI;
using Verse.Sound;
using Unity.Jobs;

namespace WhoXiuXian
{
    public class RI_JobDriver_ActivateAncientCultivatorCryptosleepCasket : JobDriver_Goto
    {
        private const int DefaultDuration = 30;

        protected override IEnumerable<Toil> MakeNewToils()
        {
            yield return Toils_Goto.GotoCell(TargetIndex.A, PathEndMode.InteractionCell);
            Toil toil = ToilMaker.MakeToil("MakeNewToils");
            toil.initAction = delegate
            {
                ((RI_Building_AncientCultivatorCryptosleepCasket)job.targetA.Thing).Activate();
            };
            toil.handlingFacing = true;
            toil.tickAction = delegate
            {
                pawn.rotationTracker.FaceTarget(base.TargetA);
            };
            toil.defaultCompleteMode = ToilCompleteMode.Delay;
            toil.defaultDuration = 30;
            toil.FailOnCannotTouch(TargetIndex.A, PathEndMode.InteractionCell);
            yield return toil;
        }
    }
}